<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/9/16
 * Time: 10:59
 */

namespace app\common\validate;


use think\Validate;

class SysOrder extends Validate
{
    protected $rule = [ // 定义验证规则
//        'order_no|事故号' => 'require|unique:SysOrder,order_no',
        'company_id|保险公司' => 'require',
//        'vehicle_frame_no|车架号' => 'require',
        'vehicle_license_num|车牌号' => [
            'require',
            'regex'=>'/^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新使]{1}[A-Z]{1}[0-9a-zA-Z挂]{5}$/u'
        ],
        'car_series|车系名称' => 'require',
        'repair_company_name|修理厂名称' => 'require',
    ];

    protected $message = [ // 定义验证提示
        'vehicle_license_num.regex'=>'车牌号填写有误'
    ];

    protected $scene = [ // 定义验证场景

    ];
}